<script setup lang="ts">
import type { channelsApiChannels } from '../types/channels'
defineProps<{
  list: channelsApiChannels
  currId: number
}>()
const emits = defineEmits<{
  (xxx: 'setCurrId', xxxid: number): void
}>()
const aClick = (id: number) => {
  emits('setCurrId', id)
}
</script>

<template>
  <div class="channel-nav">
    <nav class="list">
      <a
        @click="aClick(item.id)"
        class="item"
        :class="{ active: currId === item.id }"
        href="javascript:;"
        v-for="(item, i) in list"
        :key="i"
      >
        {{ item.name }}
      </a>
    </nav>
  </div>
</template>
